#ifndef TCChar_h__
#define TCChar_h__

namespace inf {
  template<typename Type>
  struct ConstChar;

  template<>
  struct ConstChar<char> {
    static const char StrZero = '\0';
    static const char BackSlash = '\\';
    static const char Slash = '/';
    static const char Quote = '\"';
    static const char SingleQuote = '\'';
    static const char WhiteSpace = ' ';
    static const char Dot = '.';
    static const char add = '+';
    static const char Sub = '-';
    static const char Formfeed = '\f';
    static const char NewLine = '\n';
    static const char Return = '\r';
    static const char Table = '\t';
    static const char VerticalTable = '\v';
    static const char Question = '?';
    static const char Star = '*';
    static const char OpenQuad = '[';
    static const char CloseQuad = ']';

    static const char _0 = '0';
    static const char _1 = '1';
    static const char _2 = '2';
    static const char _3 = '3';
    static const char _4 = '4';
    static const char _5 = '5';
    static const char _6 = '6';
    static const char _7 = '7';
    static const char _8 = '8';
    static const char _9 = '9';

    static const char A = 'A';
    static const char F = 'F';
    static const char Z = 'Z';

    static const char a = 'a';
    static const char f = 'f';
    static const char z = 'z';
  };
  template<>
  struct ConstChar<wchar_t> {
    static const wchar_t StrZero = L'\0';
    static const wchar_t BackSlash = L'\\';
    static const wchar_t Slash = L'/';
    static const wchar_t Quote = L'\"';
    static const wchar_t SingleQuote = L'\'';
    static const wchar_t WhiteSpace = L' ';
    static const wchar_t Dot = L'.';
    static const wchar_t add = L'+';
    static const wchar_t Sub = L'-';
    static const wchar_t Formfeed = L'\f';
    static const wchar_t NewLine = L'\n';
    static const wchar_t Return = L'\r';
    static const wchar_t Table = L'\t';
    static const wchar_t VerticalTable = L'\v';
    static const wchar_t Question = '?';
    static const wchar_t Star = '*';
    static const wchar_t OpenQuad = '[';
    static const wchar_t CloseQuad = ']';

    static const wchar_t _0 = L'0';
    static const wchar_t _1 = L'1';
    static const wchar_t _2 = L'2';
    static const wchar_t _3 = L'3';
    static const wchar_t _4 = L'4';
    static const wchar_t _5 = L'5';
    static const wchar_t _6 = L'6';
    static const wchar_t _7 = L'7';
    static const wchar_t _8 = L'8';
    static const wchar_t _9 = L'9';

    static const wchar_t A = L'A';
    static const wchar_t F = L'F';
    static const wchar_t Z = L'Z';

    static const wchar_t a = L'a';
    static const wchar_t f = L'f';
    static const wchar_t z = L'z';
  };

  template<typename Type, typename Dummy =NullType>
  struct ConstLabel;
  template<typename Dummy>
  struct ConstLabel<char,Dummy> {
    static const char True[];
    static const char False[];
    static const char empty[];

    static const char FmtInteger[];
    static const char FmtUnsignedInteger[];
    static const char FmtFloat[];
	static const char FmtDouble[];
  };
  template<typename Dummy> const char ConstLabel<char,Dummy>::True[] = "true";
  template<typename Dummy> const char ConstLabel<char,Dummy>::False[] = "false";
  template<typename Dummy> const char ConstLabel<char,Dummy>::empty[] = "";
  template<typename Dummy> const char ConstLabel<char,Dummy>::FmtInteger[] = "%d";
  template<typename Dummy> const char ConstLabel<char,Dummy>::FmtUnsignedInteger[] = "%u";
  template<typename Dummy> const char ConstLabel<char,Dummy>::FmtFloat[] = "%f";
  template<typename Dummy> const char ConstLabel<char,Dummy>::FmtDouble[] = "%.16f";

  template<typename Dummy>
  struct ConstLabel<wchar_t,Dummy> {
    static const wchar_t True[];
    static const wchar_t False[];
    static const wchar_t empty[];

    static const wchar_t FmtInteger[];
    static const wchar_t FmtUnsignedInteger[];
    static const wchar_t FmtFloat[];
	static const wchar_t FmtDouble[];
  };
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::True[] = L"true";
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::False[] = L"false";
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::empty[] = L"";
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::FmtInteger[] = L"%d";
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::FmtUnsignedInteger[] = L"%u";
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::FmtFloat[] = L"%f";
  template<typename Dummy> const wchar_t ConstLabel<wchar_t,Dummy>::FmtDouble[] = L"%.16f";

} // ::inf

#ifdef INF_UNICODE
#define TL(s)        (L##s)
#else
#define TL(s)        (s)
#endif

#endif // TCChar_h__